#include"cmd_mysql.h"
#include"cmdStack.h"
#include<func.h>
#include <mysql/mysql.h>
int main(int argc,char*argv[])
{
    //栈
    taskStack_t Stack;
    initStack(&Stack,"/home/wtto/Linux53/LINUX/Unit_WANGPANG/Mysql_test");
    //printf("length = %d data = %s\n",Stack.size,Stack.pFront->data);
    mysql_info_t info;
    strcpy(info.host,"localhost");
    strcpy(info.user,"root");
    strcpy(info.passwad,"123456");
    strcpy(info.databases,"netdisk");
    init_Usertask(&info,&Stack,"zhangsan");
    ///@brief init_Usertask_test
    //printf("%s\n",Stack.pTail->data);
    //printf("length = %d data = %s\n",Stack.size,Stack.pFront->data);
    //pwd_mysql(&info,&Stack,"zhangsan");
    //printf("%s\n",Stack.pTail->data);
    /*---------------------------------------------------------------*/
    /// @brief obtain test
    //char buf[1024] = {0};
    //obtain_path(&Stack,&buf);
    //printf("%s\n",buf);
    //int ret = filepath_legitimate(&info,"111111");
    //printf("ret = %d\n",ret);
    //enStack(&Stack,"3");
    //enStack(&Stack,"4");
    
    //scanf("%s",buf);
    //ls_mysql(&info,&Stack,"zhangsan");

    //scanf("%s\n",buf);
    int ret = cd_mysql(&info,"zhangsan",&Stack,"/dir1");
    //if(ret!=-1)
    //{
        //printf("Stack size = %d, pTail.data = %s\n",Stack.size,Stack.pFront->data);
    //}
    pwd_mysql(&info,&Stack,"zhangsan");
    ls_mysql(&info,&Stack,"zhangsan");
    return 0;
}